/get/customerInfo/{customerid}/{zipcode}
midway.route({
id: 'customerInfo',
label: 'Customer Info',
path: '/get/customerInfo/{customerid}',
method: 'GET',
variantLabel: 'Get Customer Info',
handler: function (req, reply) {
reply('How to read the customer id :(');
}
});
var id = req.params.customerid;
midway.route({
id: 'customerInfo',
label: 'Customer Info',
path: '/get/customerInfo/{customerid}',
method: 'GET',
variantLabel: 'Get Customer Info',
handler: function (req, reply) {
var id = req.params.customerid;
reply('Customer id is ' + id + ' :)');
}
});
Try to pass dynamic url parameters generated from Midway UI